package com.qiankan.qmsj;

import android.app.Application;
import android.content.IntentFilter;
import android.net.ConnectivityManager;

import com.umeng.socialize.PlatformConfig;
import com.umeng.socialize.UMShareAPI;
import com.qiankan.qmsj.receive.NetworkReceiver;

/**
 * Created by Administrator on 2017/8/17.
 */

public class JDQBApplication extends Application {
    public static UserInfo mLoginInfo;

    @Override
    public void onCreate() {
        super.onCreate();
        setNetAndSDCard();
        UMShareAPI.get(this);
    }

    {
        PlatformConfig.setWeixin("wxfbb7bc0e09e5f0a4", "5c6050e6bf74848931299fbd6f7bab27");
        PlatformConfig.setQQZone("1106484437", "aFkSaCQAQMlrSM7L");
        PlatformConfig.setSinaWeibo("3921700954", "04b48b094faeb16683c32669824ebdad");
    }

    private void setNetAndSDCard() {
        IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
        NetworkReceiver netWorkReceiver = new NetworkReceiver();
        this.registerReceiver(netWorkReceiver, filter);
    }
}
